Skip to main content

ArrayPlot

Wolfram Kernel
Execution environment

Generates a plot, where values are shown in a discrete array of blocks

danger

Since Graphics in this implementation cannot guess the plot range, you need to provide this explicitly. Use MatrixPlot if you want it to happen automatically.

ArrayPlot[{{1, 0, 0, Pink}, {1, 1, 0, Pink}, {1, 0, 1, Red}}];
Insert[%, PlotRange->{{0,4}, {0,3}}, 2]

Combining it with Controls option for Graphics, you can zoom and pan the plot using your mouse

ArrayPlot[Table[Sin[x y], {x, -40, 40}, {y, -40, 40}]];
Insert[%, PlotRange->{{0,80}, {0,80}}, 2];
Insert[%, Controls->True, 2]